<%--
  Created by IntelliJ IDEA.
  User: 70481
  Date: 2019/9/22
  Time: 17:53
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>日志信息</title>
    <link href="layui/css/layui.css" rel="stylesheet" type="text/css">
</head>
<body>
<table id="myTable" lay-filter="myTable"></table>

</body>

<script type="text/javascript" src="${pageContext.request.contextPath}/layui/layui.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.12.4.js"></script>

<script type="text/javascript">
    layui.use("table",function () {
        var table = layui.table;

        table.render({
            elem: '#myTable'
            ,url: '${pageContext.request.contextPath}/log/selectLog' //数据接口
            ,page: true //开启分页
            ,title:"日志记录表"
            ,defaultToolbar:[]
            ,cols: [[ //表头
                {field: 'logId', title: '编号'}
                ,{field: 'logType', title: '操作类型',templet:"#titleTpl"}
                ,{field: 'logOprater', title: '操作者'}
                ,{field: 'logContent', title: '内容'}
                ,{field: 'logDate', title: '时间'}
            ]]
        })
    })
</script>

<script type="text/html" id="titleTpl">
    {{#  if(d.id == 1){ }}
    登陆记录
    {{#  } else { }}
    诊断记录
    {{#  } }}
</script>
</html>
